<template>
  <div class="regionTree">
    <div class="tree-header">
      区划目录<i class="el-icon-question" style="margin-left: 6px;color: #646262"/>
    </div>
    <div style="padding-top: 10px">
      <area-of-work @selected="areaSelectedHandler" :is-edit="isEditTree"/>
    </div>
  </div>
</template>

<script lang="ts">
import {Component, Vue,Emit,Prop} from 'vue-property-decorator';
import AreaOfWork from '@/components/AreaOfWork.vue';

@Component({
  components: {AreaOfWork}
})
export default class AreaTree extends Vue {

  private showTreeMenu:any;
  private contextNode:any;


  @Prop()
  private isEditTree!:any

  @Emit('selected')
  areaSelectedHandler(model:any){
    return model;
  }
}
</script>
<style lang="scss" scoped>
.regionTree {
  width: 240px;
  height: 100%;
  overflow: auto;
  background: #ffffff;
  padding: 10px;
  box-shadow: 2px 2px 3px 0 rgba(9, 9, 9, 0.2);
  .tree-header {
    color: #006400;
    font-size: 15px;
    padding-bottom: 8px;
    padding-left: 8px;
    border-bottom: 1px solid #006400;
    position: relative;

    &:after {
      content: '';
      position: absolute;
      left: 0;
      top: 3px;
      width: 3px;
      height: 15px;
      border-radius: 3px;
      background: #006400;
    }

    &:before {
      content: '';
      position: absolute;
      left: 3px;
      top: 4px;
      width: 3px;
      height: 12px;
      border-radius: 2px;
      background: #f68c4e;
    }
  }
}
</style>
